<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>

<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><s:if test="content.contentId==null"><s:text name="content.add.title"/></s:if><s:else><s:text name="content.edit.title"/></s:else></title>
	<%@ include file="/common/meta.jsp"%>
	<%@ include file="/common/common.jsp"%>
	<script type="text/javascript" src="${ctx}/js/jquery.progressbar.js"></script>
	<script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>

</head>
<body>
<div id="wrapper">
	<div class="curmb"><s:text name="your.site.position"/>:<a href="${ctx}/welcome.action"><s:text name="homepage"/></a><span>></span><s:text name="content.title"/></div>
	<div class="listtit">
		<p><span>
			<strong>
				<s:if test="softwareContent.contentId==null"><s:text name="content.add.title"/></s:if>
				<s:elseif test="cflag!=null&&cflag.equals(\"1\")">内容审核</s:elseif>
				<s:else><s:text name="content.edit.title"/></s:else> 
			</strong>
		</span></p>
	</div>
	<div class="listadd">
		<%-- <s:form action="content-upload"  enctype="multipart/form-data" method="post" onsubmit="return chkform()"> --%>
		<s:form action="softwarecontent-save" onsubmit="return chkform()" id="save-form">
		<s:hidden name="cflag"/>
		<s:hidden name="softwareContent.contentId"/>
		<s:hidden name="softwareContent.category.categoryId"/>
		<s:hidden name="softwareContent.showType"/>
		<s:hidden name="softwareContent.isTop"/>
		<s:hidden name="contentAttach.attachId"/>
		<s:hidden name="contentAttach.attachMemo"/>
		<s:hidden name="softwareContent.softwarePic"/>
		<s:hidden name="topic.topicId"/>
		<s:hidden name="tflag"/>
		<s:hidden name="content.contentStatus"/>
		<s:hidden name="content.publishSug"/>
		<table class="addgrid">
			<s:if test="topic.topicName!=null">
			<tr>
				<th><s:text name="content.cmsTopic"/>:</th>
				<td><s:text name="topic.topicName"/></td>
			</tr>
			</s:if><s:else>
			<tr>
				<th><s:text name="content.cmsCategory"/>:</th>
				<td><s:property value="softwareContent.category.catName"/></td>
			</tr>
			</s:else>
			<tr>
				<th><span id="contentDescriptionno" style="color:red">*</span><s:text name="content.contentTitle"/>:</th>
				<td><select name="showType_1"><option value="1">原创</option><option value="0">转载</option></select><s:textfield id="contentTitle" name="softwareContent.contentTitle" required="true" requiredposition="right" cssClass="txtin450"/><span id="contentTitleno"></span><a href="#this" onclick="addSimpleTitle()">*添加文章副标题</a><span id="catContentTitleAlert" style="color :red"><s:property value="softwareContent.category.catContentTitleAlert"/></span></td>
			</tr>
			<tr id="simpleT_1">
				<th>文章副标题:</th>
				<td><s:textfield id="content.simpleTitle1" name="softwareContent.simpleTitle1" cssClass="txtin450" onblur="simpleTitle1(this)"/><a href="#this" onclick="removeSimpleTitle('simpleT_1')">删除文章副标题</a></td>
			</tr>
			<tr id="simpleT_2">
				<th>文章副标题:</th>
				<td><s:textfield id="content.simpleTitle2" name="softwareContent.simpleTitle2" cssClass="txtin450" onblur="simpleTitle2(this)"/><a href="#this" onclick="removeSimpleTitle('simpleT_2')">删除文章副标题</a></td>
			</tr>
			<tr id="simpleT_3">
				<th>文章副标题:</th>
				<td><s:textfield id="content.simpleTitle3" name="softwareContent.simpleTitle3" cssClass="txtin450" onblur="simpleTitle3(this)"/><a href="#this" onclick="removeSimpleTitle('simpleT_3')">删除文章副标题</a></td>
			</tr>
			<tr>
				<th>自定义属性:</th>
				<td>
					<input type="checkbox" name="isTop_f">置顶</input>
					<input type="checkbox" name="showType_o">最新</input>
					<input type="checkbox" name="showType_o">推荐</input>
					<input type="checkbox" name="showType_o">精选</input>
					<input type="checkbox" name="showType_o">热点</input>
				</td>
			</tr>
			<tr>
				<th>是否允许评论:</th>
				<td>
					<s:if test="softwareContent.category.isComment">
						<s:select list="dicIsComment" value="softwareContent.isComment" name="softwareContent.isComment" cssClass="selectClass" listKey="dictionaryKey" listValue="dictionaryValue"/>
					</s:if>
					<s:else>
						<s:select list="dicIsComment" value="softwareContent.category.isComment" name="softwareContent.isComment" cssClass="selectClass" listKey="dictionaryKey" listValue="dictionaryValue" disabled="true" />
					</s:else>
				</td>
			</tr>
			<tr>
				<th><s:text name="content.contentAuthor"/>:</th>
				<td><s:textfield id="softwareContent.contentAuthor" name="content.contentAuthor" required="true" requiredposition="right" cssClass="txtin" onblur="contentAuthor(this)"/></td>
			</tr>
			<tr>
				<th><s:text name="key.words"/>:</th>
				<td><s:textfield id="keywords" name="softwareContent.keywords" required="true" requiredposition="right" cssClass="txtin"/><span id="keywordsno">多个关键字请以','隔开</span></td>
			</tr>
			<tr>
				<th><span id="contentDescriptionno" style="color:red">*</span><s:text name="content.contentDescription"/>:</th>
				<td><s:textarea id="contentDescription" onblur="checkDes()" name="softwareContent.contentDescription" required="true" requiredposition="right" cols="140" rows="4"/><span id="desPoint"></span></td>
			</tr>
			<tr>
				<th><s:text name="content.contentContext"/>:</th>
				<td><textarea id="softwareContent.contentContext" name="softwareContent.contentContext"><s:property value="softwareContent.contentContext"/></textarea>
					<ckeditor:replace  replace="softwareContent.contentContext" basePath="${ctx}/common/ckeditor/" /></td>
			</tr>
			<tr>
				<th><s:text name="content.contentTpl"/>:</th>
				<td>
					<s:if test="softwareContent.category.categoryId!=''"><s:select name="content.contentTpl" list="contenttpllist" /></s:if>
					<s:else><s:select name="content.contentTpl" list="toptpllist" /></s:else>
				</td>
			</tr>
			<tr >
				<th><span id="softupload" style="color:red">*</span>上传软件</th>
				<td id="before">
					<div class="loadtit">只可上传一个软件<span class="colorr">（单个文件上传大小不能超过20M）</span></div>
					<div class="loadmain">

						<div class="loadway">
							<input type="button" class="loadwayrar" onclick="up()" onmousemove="document.getElementById('bester').style.pixelLeft=event.x-60;document.getElementById('bester').style.pixelTop=event.y-10;"/>
							<p>（文件格式必须为rar/zip）</p>
						</div>
					</div>
				</td>
				<td id="uploads">
				</td>
			</tr>
			<tr>
				<th><span id="contentDescriptionno" style="color:red">*</span><s:text name="content.contentSource"/>:</th>
				<td><s:textfield id="contentSource" name="softwareContent.contentSource" required="true" requiredposition="right" cssClass="txtin"/><span id="contentSourceno"></span></td>
			</tr>
			<tr>
				<th><s:text name="content.softwareType"/>:</th>
				<td><s:textfield name="softwareContent.softwareType" required="true" requiredposition="right" cssClass="txtin"/></td>
			</tr>
			<tr>
				<th><s:text name="content.softwareAuth"/>:</th>
				<td><s:textfield name="softwareContent.softwareAuth" required="true" requiredposition="right" cssClass="txtin"/></td>
			</tr>
			<tr>
				<th><s:text name="content.softwareEnv"/>:</th>
				<td><s:textfield name="softwareContent.softwareEnv" required="true" requiredposition="right" cssClass="txtin"/></td>
			</tr>
			<tr>
				<th><s:text name="content.softwareLanguage"/>:</th>
				<td><s:textfield name="softwareContent.softwareLanguage" required="true" requiredposition="right" cssClass="txtin"/></td>
			</tr>
			<tr>
				<th><s:text name="content.softwareLevel"/>:</th>
				<td><s:textfield name="softwareContent.softwareLevel" required="true" requiredposition="right" cssClass="txtin"/></td>
			</tr>
			<tr>
				<th><s:text name="content.softwarePic"/>:</th>
				<td>
					<input type='text' Class="txtin" readonly="readonly" id="softwarePic" onmousemove="if($('input[name=attachId]').val()==null){alert('请先上传软件！');return false;}document.getElementById('besterPic').style.pixelLeft=event.x-60;document.getElementById('besterPic').style.pixelTop=event.y-10;"/>
					<input type="button" value="浏览" class="btnlist2" id="brows" onmousemove="if($('input[name=attachId]').val()==null){alert('请先上传软件！');return false;}document.getElementById('besterPic').style.pixelLeft=event.x-60;document.getElementById('besterPic').style.pixelTop=event.y-10;"/>
				</td>
			</tr>
			<tr>
				<th><s:text name="content.softwareScore"/>:</th>
				<td><s:textfield name="softwareContent.softwareScore" required="true" requiredposition="right" cssClass="txtin"/></td>
			</tr>
			<s:if test="cflag!=null&&cflag.equals(\"1\")">
				<tr>
					<th>创建时间:</th>
					<td><s:date name="softwareContent.createTime" format="yyyy年MM月dd日  HH:mm:ss" /></td>
				</tr>
				<tr>
					<th>修改时间:</th>
					<td><s:date name="softwareContent.updateTime" format="yyyy年MM月dd日 HH:mm:ss" /></td>
				</tr>
				<tr>
					<th>发布时间:</th>
					<td><input name="softwareContent.publishTime" size="30" class="Wdate" id="qry_startTime_4" readonly="true"  value="<s:date name="softwareContent.publishTime" format="yyyy-MM-dd HH:mm:ss"/>"
							onFocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text"/></td>
				</tr>
				<tr>
					<th>发布类型:</th>
					<td>
						发布到：<s:select list="dicPublishType" value="softwareContent.publishType" name="softwareContent.publishType" cssClass="selectClass" listKey="dictionaryKey" listValue="dictionaryValue"/></td>
				</tr>
				<tr>
					<th>操作日志:</th>
					<td><a href="#this" id="operLog">查看操作日志</a></td>
				</tr>
				<tr>
					<th>审核:</th>
					<td>
					<s:select list="dicAudit" value="softwareContent.contentStatus" headerKey="" headerValue="--请选择--" name="softwareContent.contentStatus" cssClass="selectClass" listKey="dictionaryKey" listValue="dictionaryValue"/>
					<span id="audit_status" style="color:red;display:none;">请选择!</span>
					</td>
				</tr>
				<tr>
					<th><s:text name="content.publishSug"/>:</th>
					<td><s:textarea cols="140" rows="4"  name="softwareContent.publishSug" required="true" requiredposition="right" /><span id="keywordssug" style="color:red">请输入审核意见!</span></td>
				</tr>
			</s:if><s:else>
				<tr>
					<th>创建时间:</th>
					<td><s:if test="softwareContent.createTime!=null"><s:date name="content.createTime" format="yyyy年MM月dd日 HH:mm:ss" /></s:if>
						<s:else><s:date name="softwareContent.publishTime" format="yyyy年MM月dd日  HH:mm:ss" /></s:else>
					</td>
				</tr>
				<tr>
					<th>修改时间:</th>
					<td>
						<s:if test="softwareContent.updateTime!=null"><s:date name="softwareContent.updateTime" format="yyyy年MM月dd日 HH:mm:ss" /></s:if>
					</td>
				</tr>
				<tr>
					<th>发布时间:</th>
					<td><input name="softwareContent.publishTime" size="30"  class="Wdate" id="qry_startTime_1" readonly="true"  value="<s:date name="softwareContent.publishTime" format="yyyy-MM-dd HH:mm:ss"/>"
							onFocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text"/></td>
				</tr>
				<tr>
					<th>审核:</th>
					<td> 
						<s:if test="softwareContent.contentStatus==1">审核通过</s:if>
						<s:elseif test="softwareContent.contentStatus==2">审核未通过</s:elseif>
						<s:else>未审核</s:else>
					</td> 
				</tr>
				<tr>
					<th>审核意见:</th>
					<td> <s:property  value="softwareContent.publishSug"  /></td>					 
				</tr>
				<tr>
					<th>发布类型:</th>
					<td>
						发布到：<s:select list="dicPublishType" value="softwareContent.publishType" name="softwareContent.publishType" cssClass="selectClass" listKey="dictionaryKey" listValue="dictionaryValue"/></td>
				</tr>
			</s:else>
			<tr>
				<th>&nbsp;</th>
				<td>
				    <s:if test="cflag!=null&&cflag.equals(\"1\")"><input type="button" value="<s:text name="save"/>" class="btnlist2" onclick="goAudit()"/></s:if>
					<s:elseif test="%{authLicence('3_3_3',content.category.categoryId)}">
					  <s:submit value="%{getText('save')}" cssClass="btnlist2" id="save"/>
					</s:elseif>
					<s:elseif test="%{authLicence('4_4_3',topic.topicId)}">
					  <s:submit value="%{getText('save')}" cssClass="btnlist2" id="save"/>
					</s:elseif>
					<s:else>
						<s:submit value="%{getText('save')}" cssClass="btnlist2" id="save"/>
					</s:else>
				<s:if test="content.contentId==null"></s:if><s:else><s:submit value="%{getText('preview')}" cssClass="btnlist2"/></s:else>
				<s:reset value="%{getText('reset')}" cssClass="btnlist2"/><input type="button" value="返回" class="btnlist2" onclick="javascript:history.go(-1);"/></td>
			</tr>
		</table>
		</s:form>
	</div>
</div>
<div id="lightbox" class="lightbox" >
	<div class="lighttit"><p><span><input type="button" value="&nbsp;" id="lightclose" class="lightclose" /><strong>操作日志</strong></span></p></div>
	<div class="lightmain">
		<div class="lightmaintit">操作日志查看</div>
		<div class="ilghtmainbox" style="OVERFLOW-y:auto;OVERFLOW:scroll;overflow-x:auto;">
			<div id="authorSetDiv" >
				<table class="listgridb" cellspacing="1" id="listbox">
					<tbody>
						<tr>
							<th>时间</th>
							<th>IP地址</th>
							<th>用户</th>
							<th>操作</th>
						</tr>
						<s:iterator value="operLogList">
							<tr>
							<td><s:property value="operTime"/>&nbsp;</td>
							<td><s:property value="operIp"/>&nbsp;</td>
							<td><s:property value="loginName"/>&nbsp;</td>
							<td><s:property value="operAct"/>&nbsp;</td>
							</tr>
						</s:iterator>
					</tbody>
				</table>
			</div>
		</div>
		<div class="lightbtnbox"><input type="button" value="确认" id="lightsubmit" class="btnlist2" onclick="authorSet()"/></div>
	</div>
</div>
<form name="uploadForm" id="uploadForm"  method="post" enctype="multipart/form-data"  target='hidden_frame' target='hidden_frame' style="width: 2px;height: 2px;overflow: hidden;">
				<div class="padding6-14">
					  <table align="center" width="100%" border="0" cellspacing="0" class="addgrid">
						<tr>
							<Th>上传附件:</th>
							<td>
								<input type='file' size='1' name='upload' value='上传' id='bester'  onchange='doSubmitSaveSoftware(this.value,this)' style="position:absolute;filter:alpha(opacity=0);" hidefocus/>
								<input type='file' size='1' name='uploadp' value='上传' id='besterPic'  onchange='doSubmitSaveSoftwarePic(this.value,this)' style="position:absolute;filter:alpha(opacity=0);" hidefocus/>
							</td>
						</tr>
						<tr>
							<th>附件</th>
							<td class='clearpm'></td>
						</tr>
						<iframe name='hidden_frame' id='hidden_frame' style='display:none'></iframe>
					</table>                   
				 </div>
		</form>
</body>
</html>
<script type="text/javascript" defer="defer">
		var isNotSave=true;
		$("#operLog").click(function(){
			$$.shade("#operLog","#lightclose,#lightsubmit","#lightbox","600");
		});
		ajaxAction="${ctx}";
		window.onbeforeunload=function (){
		};
		window.onunload = function (){
			
			<s:if test="softwareContent.contentId!=null">
			if(isNotSave){
				$.post("content-ajaxunlock.action?content.contentId=<s:property value="softwareContent.contentId"/>&status=<s:property value="status"/>");
			}
			</s:if>
			
			//进行数据清除
			if($("input[name=softwareContent.contentId]").val()!=""&&$("#contentTitle").val()==""){
				var contentId = $("input[name=softwareContent.contentId]").val();
				$.ajax({	
					url:"${ctx}/content/softwarecontent-delete.action?time="+new Date().getTime(),
					data:{"key":contentId},
					dataType:"text",
					success:function(data){
						
					},
					error:function(data){
						alert("删除失败");
					}
				});
			}
		};

		$("#contentTitle").blur(function(){
			var maxLen=100;
			var contentTitle=$("#contentTitle").val();
			
			 str = jQuery.trim(contentTitle);
			 document.getElementById("contentTitle").value=str;
			 
			contentTitle=$.trim(contentTitle);
			if((contentTitle==""||contentTitle.length==0)){
				$("#contentTitleno").html("文章标题不能为空");
				$("#contentTitleno").css("color","red");
			}
			if(contentTitle!=""){
				$("#contentTitleno").html("");
			}
			if ((contentTitle.length )> maxLen) {
				var ss=$("#contentTitle").val( $("#contentTitle").val().substr(0, maxLen) );
				$("#contentTitleno").html("文章标题过长");
				$("#contentTitleno").css("color","red");
			}
		});
		$("#keywords").blur(function(){
				var maxLen=100;
				var keywords=$("#keywords").val();
				
				 str = jQuery.trim(keywords);
				 document.getElementById("keywords").value=str;
				 
				keywords=$.trim(keywords);
				if ((keywords.length )> maxLen) {
					var ss=$("#keywords").val( $("#keywords").val().substr(0, maxLen) );
					$("#keywordsno").html("字符过长");
					$("#keywordsno").css("color","red");
				}
		});
		$("#contentSource").blur(function(){
			var maxLen=100;
			var contentSource=$("#contentSource").val();
			 
			str = jQuery.trim(contentSource);
			 document.getElementById("contentSource").value=str;
			 
			contentSource=$.trim(contentSource);
			if((contentSource==""||contentSource.length==0)){
				$("#contentSourceno").html("文章来源不能为空");
				$("#contentSourceno").css("color","red");
			}
			if(contentSource!=""){
				$("#contentSourceno").html("");
			}
			if ((contentSource.length )> maxLen) {
				var ss=$("#contentSource").val( $("#contentSource").val().substr(0, maxLen) );
				$("#contentSourceno").html("字符过长");
				$("#contentSourceno").css("color","red");
			}
		});
		$('#save').click(function(){
			var contentTitle = $("#contentTitle").val();
			var contentDescription = $("#contentDescription").val();
			var contentSource = $("#contentSource").val();
			if(contentTitle==""){
				alert('请输入文章标题');
				return false;
			}
			if(contentSource==""){
				alert('请输入文章来源');
				return false;
			}
			 if(contentDescription==""){
				alert('请输入简述内容');
				return false;
			}  
		});
	$("#softwarePic").click(function(){
		if($("input[name=attachId]").val()==null){
			alert("请选上传软件！");
			return false;
		}
		//$("#uploadForm").show();
		$("#besterPic").click();
		//$("#uploadForm").hide();
	});
	$("#brows").click(function(){
		if($("input[name=attachId]").val()==null){
			alert("请选上传软件！");
			return false;
		}
		//$("#uploadForm").show();
		$("#besterPic").click();
		//$("#uploadForm").hide();
	});
	$(document).ready(function() {
		<s:if test="softwareContent.simpleTitle1==null">
			$("#simpleT_1").hide();
		</s:if>
		<s:if test="softwareContent.simpleTitle2==null">
			$("#simpleT_2").hide();
		</s:if>
		<s:if test="softwareContent.simpleTitle3==null">
			$("#simpleT_3").hide();
		</s:if>
		if($('input[name=softwareContent.contentId]').val()!=''){
			listFile($('input[name=softwareContent.contentId]').val(),"software");
		}
		//$("#uploadForm").hide();
		if($("input[name=softwareContent.isTop]").val()=="false"||$("input[name=softwareContent.isTop]").val()==""){
			$("input[name=isTop_f]").attr("checked","");
		}else{
			$("input[name=isTop_f]").attr("checked","checked");
		}
		var showType = $("input[name=softwareContent.showType]").val();
		$("select[name=showType_1]").val(showType.charAt(0));
		$("input[name=showType_o]").each(function(i){
			if(showType.charAt(i+1)=="1"){
				$(this).attr("checked","checked");
			}
		});
		var tpl = "<s:property value="content.category.catContentTplSet"/>";
		if(tpl==""){
			$("select[name=softwareContent.contentTpl] option").remove();
			var str = "<option value=''>默认模板</option>";
			$("select[name=softwareContent.contentTpl]").append(str);
		}else{
			var obj = tpl.split(",");
			var str = "<option value=''>默认模板</option>";
			for(var i = 0 ; i < obj.length ; i++){
				str+="<option value="+obj[i]+">"+obj[i]+"</option>";
			}
			$("select[name=softwareContent.contentTpl]").append(str);
		}
		$("#uploads").hide();
		$("#keywordssug").hide();
	});
	function chkform(){
		var softwareContentTitle = $("input[name=softwareContent.contentTitle]").val();
		if(softwareContentTitle==""){
			alert("请输入文章标题！");
			return false;
		}
		if($("input[name=attachId]").val()==null){
			alert("请上传软件！");
			return false;
		}
		if($("input[name=isTop_f]").attr("checked")==""){
			$("input[name=softwareContent.isTop]").val(false);		
		}else{
			$("input[name=softwareContent.isTop]").val(true);
		}
		var showType = $("select[name=showType_1]").val();
		$("input[name=showType_o]").each(function(){
			if($(this).attr("checked")==""){
				showType+="0";
			}else{
				showType+="1";
			}
		});
		showType+="0";
		$("input[name=softwareContent.showType]").val(showType);
		$("input[name=contentAttach.attachId]").val($("input[name=attachId]").val());
		$("input[name=contentAttach.attachMemo]").val($("input[name=attachMemo]").val());
		$("input[name=softwareContent.contentId]").val($("input[name=contentId]").val());

		isNotSave=false;
	}
	function up(){
		//$("#uploadForm").show();
		$("#bester").click();
		//$("#uploadForm").hide();
	}
	function goAudit(){
		if($('select[name=softwareContent.contentStatus] option:selected').val()==''){
			$("#audit_status").show();
			return false;
		}
		else if($('select[name=softwareContent.contentStatus] option:selected').val()==2){
			$("#audit_status").hide();
			if($("textarea[name=softwareContent.publishSug]").val()==""){
				$("#keywordssug").show();
				return false;
			}else{
				$("#keywordssug").hide();
			}
		}
		var cflag = $('select[name=softwareContent.contentStatus]').val();
		$("input[name=content.contentStatus]").val($("select[name=softwareContent.contentStatus] option:selected").val());
		$("input[name=content.publishSug]").val($("textarea[name=softwareContent.publishSug]").val());
		$('#cflag').val(cflag);
		isNotSave=false;
		$('#save-form').submit();
	}
	function initBar(){
		 $("#pb2").progressBar({ barImage: '../images/progressbg_yellow.gif'} );
		 $('#pb2').progressBar(1);
	}
	function percentBar(x){
		$('#pb2').progressBar(x);
	}
	function addSimpleTitle(){
		if($("#simpleT_1").attr("name")!="show"){
			$("#simpleT_1").attr("name","show");
			$("#simpleT_1").show();
		}else if($("#simpleT_2").attr("name")!="show"){
			$("#simpleT_2").attr("name","show");
			$("#simpleT_2").show();
		}else if($("#simpleT_3").attr("name")!="show"){
			$("#simpleT_3").attr("name","show");
			$("#simpleT_3").show();
		}else{
			alert("只可增加3个幅标题！");
		}
	}
	function removeSimpleTitle(obj){
		$("#"+obj).hide();
		$("#"+obj).attr("name","hide");
		$("#"+obj+" input").val('');
	}
	
	//文章简述判空
	function checkDes(){
		var decCont =  $("#contentDescription").val();
		 
		 str = jQuery.trim(decCont);
		 document.getElementById("contentDescription").value=str;
		 
		if(decCont == null  || decCont == ""){
			$("#desPoint").css("color","red");
			$("#desPoint").html("文章简述不能为空");
		}else{
			$("#desPoint").html("");
		}
	}
	
	function contentAuthor(str){
        str = jQuery.trim(str.value);
        document.getElementById("softwareContent.contentAuthor").value=str;
	}
   function simpleTitle1(str){
		 str = jQuery.trim(str.value);
		 document.getElementById("content.simpleTitle1").value=str;
   }
   function simpleTitle2(str){
		 str = jQuery.trim(str.value);
		 document.getElementById("content.simpleTitle2").value=str;
   }
   function simpleTitle3(str){
		 str = jQuery.trim(str.value);
		 document.getElementById("content.simpleTitle3").value=str;
   }
</script>